﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace AMVNewsParser
{
    public partial class FormMain : Form
    {
        public FormMain()
        {
            InitializeComponent();

            Gl.fPathAmvInfo = Application.StartupPath + "\\AMVInfo.dt";
            Gl.dPathHtmlDataAkross = Application.StartupPath + "\\HtmlDataAkross";
            Gl.dPathHtmlDataAmvNews = Application.StartupPath + "\\HtmlDataAmvNews";
            Gl.dPathHtmlDataCreaCon = Application.StartupPath + "\\HtmlDataCreaCon";
            Gl.dPathAMVInfoResult = Application.StartupPath + "\\AMVInfoResult";

            if (!Directory.Exists(Gl.dPathHtmlDataAkross)) Directory.CreateDirectory(Gl.dPathHtmlDataAkross);
            if (!Directory.Exists(Gl.dPathHtmlDataAmvNews)) Directory.CreateDirectory(Gl.dPathHtmlDataAmvNews);
            if (!Directory.Exists(Gl.dPathHtmlDataCreaCon)) Directory.CreateDirectory(Gl.dPathHtmlDataCreaCon);
            if (!Directory.Exists(Gl.dPathAMVInfoResult)) Directory.CreateDirectory(Gl.dPathAMVInfoResult);

        }

        private void tBtnLoadFromInet_Click(object sender, EventArgs e)
        {
            FormGrabAMVNews frmGrab = new FormGrabAMVNews();
            frmGrab.ShowDialog();
            frmGrab.Dispose();
        }

        private void tBtnParse_Click(object sender, EventArgs e)
        {
            FormParse frmParse = new FormParse();
            frmParse.ShowDialog();
            frmParse.Dispose();
        }

        private void tBtnGrab_Click(object sender, EventArgs e)
        {
            FormGrab frmGrab = new FormGrab();
            frmGrab.ShowDialog();
            frmGrab.Dispose();
        }

    }
}
